#include<stdio.h>
int main()
{
    char a,b,c;
    while(~scanf("%c%c%c",&a,&b,&c))
    {
        if(a>b)
        {
            char tmp = a;
            a = b;
            b = tmp;
        }
        if(b>c)
        {
            char tmp = b;
            b = c;
            c = tmp;
        }
        if(a>b)
        {
            char tmp = a;
            a = b;
            b = tmp;
        }
        printf("%c %c %c\n",a,b,c);
        fflush(stdin);
    }
    return 0;
}